let {
  statusBarHeight
} = uni.getSystemInfoSync()


export const statusBarHeights = () => {
  return statusBarHeight || 30
}

export const titleBarHeight = () => {
  if (uni.getMenuButtonBoundingClientRect) {
    let {
      top,
      height
    } = uni.getMenuButtonBoundingClientRect()
    return height + (top - statusBarHeight) * 2 || 0
  } else {
    return 60
  }
}

export const navBarHeight = () => {
  return statusBarHeights() + titleBarHeight()
}